package fiarredundant;

public abstract class Node {
        private Node parent;
        private int value;

        public Node(Node parent, int value) {
            this.parent = parent;
            this.value = value;
        }

        public boolean isRoot() {
            return parent == null;
        }

        public abstract boolean isLeaf();

        public int getValue() {
            return value;
        }

        public void setValue(int value) {
            this.value = value;
        }
    }
